package org.ust.analyse;

import java.util.ArrayList;
import java.util.Iterator;

public class FieldDeclarationStructure
{

	private ArrayList < String >	variableDeclarationFragment;
	private String					type;

	@ SuppressWarnings ( "unchecked" )
	@ Override
	public String toString ( )
	{
		String output = "";

		output += getType ( ) + " ";

		if ( getFragments ( ) != null && getFragments ( ).size ( ) > 0 )
		{
			Iterator it = getFragments ( ).iterator ( );
			while ( it.hasNext ( ) )
			{
				String type = it.next ( ).toString ( );
				output += type + " ";
			}
		}
		return output;
	}

	public void setType ( String type )
	{
		this.type = type;
	}

	public String getType ( )
	{
		return type;
	}

	public void setFragments ( ArrayList < String > fragments )
	{
		this.variableDeclarationFragment = fragments;
	}

	public ArrayList < String > getFragments ( )
	{
		return this.variableDeclarationFragment;
	}

}
